/***********************************************************************
 * Module:  RectangleCreator.java
 * Author:  Nikola
 * Purpose: Defines the Class RectangleCreator
 ***********************************************************************/

package genedit.controller;

import genedit.model.Workspace;
import genedit.model.graph.GraphElement;
import genedit.model.graph.MyRect;

import java.awt.Dimension;
import java.awt.geom.Point2D;

public class RectangleCreator implements Creator {
	public GraphElement instantiate(Point2D position, Dimension size) {
		return new MyRect(Workspace.getInstance().getActiveDocument().getModel(), position, size,
				"Rectangle "
						+ Workspace.getInstance().getActiveDocument().getModel().getElementCount());
	}
}